﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VideoCarousel.Control;

namespace VideoCarousel.Entity
{
   
    public class ListDir
    {
       
        //internal static string GetGuid()
        //{
        //    Guid uuid = Guid.NewGuid();
        //    string strUuid = uuid.ToString();
        //    return strUuid.Replace("-", "");
        //}
        //public ListDir()
        //{
        //    ID = GetGuid();
        //}
        //public string ID { set;get;}
        public string Name { get; set; }
        public string FullName { get; set; }
        public List<ListFile> ListFile { get; set; }
    }
    public class ListFile
    {
        public string ListDirName { get; set; }
        public string Name { get; set; }
        public string FullName { get; set; }
    }
    public class PlayStateInfo : System.ComponentModel.INotifyPropertyChanged
    {
       
        public string Name { get; set; }
        public string FullName { get; set; }

        public string DirName { get; set; }
        private int playState;
        /// <summary>
        /// 0 停止 1 播放  2 暂停
        /// </summary>
        public int PlayState
        {
            set { playState = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("PlayState")); }
            get => playState;
        }
        public double Current {  get; set; }
        public double Count {  get; set; }
        private int vol;
        public int Vol
        {
            set { 
                
                vol = value; 
                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Vol"));
            }
            get => vol;
        }

        private int playType;
        /// <summary>
        /// 播放方式 0 单次播放  1 单曲循环  2列表循环 3 列表随机
        /// </summary>
        public int PlayType
        {
            set { 
                playType = value; 
                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("PlayType"));
            }
            get => playType;
        }
        private int isFull;
        /// <summary>
        /// 拉伸
        /// </summary>
        public int IsFull
        {
            set{ 

                isFull = value; 
                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("IsFull"));
             
            }
            get => isFull;
        }

        public event PropertyChangedEventHandler PropertyChanged;

        public static PlayStateInfo GetPlayStateInfo()
        {
       
            PlayStateInfo playStateInfo = new PlayStateInfo();
            playStateInfo.PlayType =AppControl.Instance.mediaInfo.PlayType;
            playStateInfo.IsFull = AppControl.Instance.mediaInfo.IsFull;
            playStateInfo.Vol = AppControl.Instance.mediaInfo.Vol;
            return playStateInfo;
        }
    }
}
